package net.roseindia.controllers;

import java.util.Map;

import javax.validation.Valid;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller

public class HelloWorldController 
{
	@RequestMapping(value="/helloworld")
	   public String helloWord(Map model)
	   {
		    
		    Info info=new Info();
		    model.put("info", info);
		    
		    return "helloworld";
	   }
	   
	@RequestMapping("/Front")
	public String hellll(@Valid Info info,BindingResult result,Model model)
	{
		String user="config";
		String pass="config";
		if(result.hasErrors())
		{
			return "Front";
		}
		return null;
		
	}
	   
  }
